import serve from "@/utils/request.js"
var method="post"

export const login = data=>{
	var url ="/admin/auth/login"
	return serve({
		url,method,
		data
	})
}

export const getUserInfo = data=>{
	var url ="/admin/auth/token"
	return serve({
		url,method,
		data
	})
}
export function logout() {
  return serve({
    url: '/admin/auth/loginOut',
    method: 'post'
  })
}




// goods
// url admin/category/index

export const category = data =>{
	return serve({
	  url: '/admin/category/index',
	  data,
	  method
	})
}


//添加
export function categoryStore(data) {
  return serve({
    url: '/admin/category/store',
    method: 'post',
    data
  })
}
//移除

export function categoryRemove(data) {
  return serve({
    url: '/admin/category/remove',
    method: 'post',
    data
  })
}

//详情

export function categorydetail(data) {
  return serve({
    url: '/admin/category/detail',
    method: 'post',
    data
  })
}


export function getToken() {
  return serve({
    url: 'qiniu/getToken', // 假地址 自行替换
    method: 'get'
  })
}
